package com.morizhang.merchanmanager.api.plugins;

import com.alibaba.fastjson.JSONArray;
import com.morizhang.merchanmanager.api.model.CommoditySellingModel;
import com.morizhang.merchanmanager.api.model.PriceModel;

import java.util.List;

/*** 基础收货功能插件
 * 主要功能：
 * 1. 进行售货
 */
public interface BasicSaleManage {

    void doSale(JSONArray saleList);
    void doReturnedPurchase(JSONArray returnedList);

    //确认指定商品在售
    boolean checkSelling(String barCode);

    //对售货价格进行管理
    PriceModel queryCommoditySellPrice(String barCode);
    List<PriceModel> selectAllCommoditySellPrice();
    void addCommoditySellPrice(PriceModel priceModel);
    void deleteCommoditySellPrice(String barCode);
    void updateCommoditySellPrice(PriceModel priceModel);

    //对商品货架保有量进行管理
    List<CommoditySellingModel> selectAllCommoditySelling();
    void addCommoditySelling(CommoditySellingModel commoditySellingModel) throws Exception;
    void deleteCommoditySelling(String serialNo);
    void updateCommoditySelling(CommoditySellingModel commoditySellingModel);
}
